<template>
  <el-menu
    :default-active="$route.path"
    background-color="#545c64"
    class="el-menu-vertical-demo"
    active-text-color="#ffd04b" router
    text-color="#fff">

   <el-menu-item index="/TodoView" >
      <i class="el-icon-s-goods"></i>
      <span slot="title">个人待办</span>
    </el-menu-item>


    <el-menu-item index="/TaskListView" >
      <i class="el-icon-user-solid"></i>
      <span slot="title">发布配置</span>
    </el-menu-item>

    <el-menu-item index="/TaskInstanceListView" >
      <i class="el-icon-s-goods"></i>
      <span slot="title">发布列表</span>
    </el-menu-item>

<!-- 全局配置和管理员配置暂时不对外开放 -->
<!--    <el-menu-item index="/GlobalListView" :disabled="Permission">-->
<!--      <i class="el-icon-s-custom"></i>-->
<!--      <span slot="title">全局配置</span>-->
<!--    </el-menu-item>-->

<!--    <el-menu-item index="/AdminProjectView" :disabled="Permission">-->
<!--      <i class="el-icon-s-goods"></i>-->
<!--      <span slot="title">管理员配置</span>-->
<!--    </el-menu-item>-->

  </el-menu>
</template>

<script>
  import {api, getRequest, postRequest} from "@/api/commit";

    export default {
      name : "AsideBar",
      data() {
        return {
          Permission: true,
        }
      },
      methods: {
        init_data() {
          getRequest(api['permission_user']).then((res) => {
            res = res.resultReturn
            if (res.data.length===0){
              this.Permission = true
            }else{
              this.Permission = false
            }
          }, (error) => {
            console.info(error)
            this.Permission = true
          })
        }
      },
      created () {
        this.init_data()
      }
    }
</script>

<style scoped>

</style>
